<% @ LANGUAGE=VBScript %> <% Dim totalPage, totalRecords, displayRecords msgnoAds = "

There are no ads has been submitted to this category." & msgBack & "

" msgInvalid = "Invalid request!" If session("user_logged_moderator" & strSUnique) Or session("admin_loggedin" & strSUnique) then moderator = True If session("admin_loggedin" & strSUnique) = True and Not listalpha then admin = True: cs = 6: End If If Request.Querystring.Count = 3 then subcatID = CStr(request.querystring.item(1)) catName = CStr(request.querystring.item(2)) subCatName = CStr(request.querystring.item(3)) On Error Resume Next If subCatName = "Show All" then showAllAds = True catID = subcatID Else catID = Left(subcatID, 2) & "00" catID = CLng(catID) isAll = " AND " & tablPfx & "Ads.scatID = " & subcatID End If On Error Goto 0 If not Request.Form("B1") = Empty then ID = CLng(Request.Form("ID")) If not ID = Empty then strsCat = "SELECT sortID,sCatID,CatID FROM " & tablPfx & "sCat WHERE catID = " & subcatID & " ORDER BY sortID;" rs.CursorLocation = 3 rs.CursorType = 3 rs.Open strsCat, strConn rc = rs.RecordCount On Error Resume Next For c = 1 to rc If Not rs.EOF then nextID = CLng(rs("sortID")) nextcatID = CLng(rs("sCatID")) If CStr(ID) = CStr(nextID) then Select Case Request.Form("B1") Case "↑": rs.MovePrevious Case "↓": rs.MoveNext End Select swapID = CLng(rs("sortID")) swapcatID = CLng(rs("sCatID")) Exit For End If rs.MoveNext End If Next On Error GoTo 0 rs.close If not swapID = Empty And Err.Number = 0 then objConn.Execute("UPDATE " & tablPfx & "Scat SET sortID = " & swapID & " WHERE sCatID = " & nextcatID & ";") objConn.Execute("UPDATE " & tablPfx & "Scat SET sortID = " & nextID & " WHERE sCatID = " & swapcatID & ";") Response.Redirect "viewlist.asp?" & Request.Querystring End If End If End If If Not showAllAds Then If listalpha then sortorder = "scatName": else sortorder = "sortID" strsCat = "SELECT * FROM " & tablPfx & "Scat WHERE (catID = " & CLng(subcatID) & strSelectCat & ") ORDER BY " & sortorder & ";" rs.CursorType = 3 rs.CursorLocation = 3 rs.Open strsCat, strConn If not rs.EOF then str3rdCatList = vbcrlf & "
" & vbcrlf rc = rs.RecordCount For f = 1 to rc cat3rdID = rs("sCatID") cat3rdName = rs("scatName") cat3rdAds = rs("ads") sortID = rs("sortID") If f mod catpos = 1 then str3rdCatList = str3rdCatList & "" & vbcrlf str3rdCatList = str3rdCatList & "" & vbcrlf If admin then str3rdCatList = str3rdCatList & "" End If str3rdCatList = str3rdCatList & "" & vbcrlf If f mod catpos = 0 then str3rdCatList = str3rdCatList & "" & vbcrlf rs.MoveNext Next str3rdCatList = str3rdCatList & "
" & vbcrlf str3rdCatList = str3rdCatList & "" & vbcrlf If f = 1 then fd = "disabled": Else: fd = Empty: End If If f = rc then ld = "disabled" str3rdCatList = str3rdCatList & "
" str3rdCatList = str3rdCatList & "" str3rdCatList = str3rdCatList & "" str3rdCatList = str3rdCatList & "

" str3rdCatList = str3rdCatList & "
" & vbcrlf str3rdCatList = str3rdCatList & "" & cat3rdName & " " str3rdCatList = str3rdCatList & "(" & cat3rdAds & ")


" & vbcrlf End If rs.close End If %>
Home::Categories List::<%= catName %>::<%= subCatName %>
<% If Not IsNull(full_description) AND Not Len(full_description) = 0 then %>

<%= full_description %>

<% End If Response.Write str3rdCatList If Not moderator then showAll = " AND " & tablPfx & "Ads.status = 1 " If isNumeric(catID) And isNumeric(subcatID) then strAd = "SELECT " & tablPfx & "Ads.adID, " & tablPfx & "Ads.pdate, " & tablPfx & "Ads.nick, " & tablPfx & "Ads.city, " & tablPfx & "Ads.subject, " & tablPfx & "Ads.images, " strAd = strAd & tablPfx & "Ads.status, " & tablPfx & "Ads.adcounter, " & tablPfx & "Ads.hotlist, " & tablPfx & "Ads.userID, " & tablPfx & "Ads.webimage, " & tablPfx & "Cat.catOpt1, " & tablPfx & "Ads.opt1" strAd = strAd & " FROM " & tablPfx & "Ads," & tablPfx & "Cat WHERE " & tablPfx & "Ads.catID = " & catID & isAll & showAll & " AND " & tablPfx & "Cat.catID = " & catID & " ORDER BY hotlist DESC, pdate DESC;" rs.PageSize = pp rs.CacheSize = pp rs.CursorLocation = 3 rs.Open strAd, strConn, 0, 1 If rs.EOF then Response.Write msgnoAds Else firstOpt = rs(11) nPage = Session("adlist_show_page" & strSUnique) URLlink = "viewlist.asp?" & Server.URLEncode(Request.Querystring) pageType = 11 strPaging = buildPages(nPage, URLlink, pageType) '## paging built in libraries.asp Response.Write "
" & strPaging Response.Write "
Total Pages: " & totalPage & "
" Response.Write "Total Posted: " & totalRecords & "
" %>
<% If len(firstOpt) > 0 then Response.Write "" %> <% For J = 1 to displayRecords If rs.EOF Then Exit For Else NA = "N/A" adID = rs(0) active = CLng(rs(6)) iDate = FormatDateTime(rs(1), 2) subject = rs(4) subject = "" & subject & "" If rs(8) then subject = "   " & subject userID = rs(9) If CStr(session("user_logged_ID" & strSUnique)) = CStr(userID) then adOwner = True nick = rs(2) city = rs(3) webImage = rs(10) If len(webImage) > 0 then imgStr = "Yes" Else: imgStr = "N/A" End If firstOptValue = rs(12) If len(firstOptValue) = 0 then firstOptValue = NA views = rs(7) If len(rs(5)) > 0 then imgTempArray = Split(rs(5), sf) img = Split(imgTempArray(0), "|")(0) size = Split(imgTempArray(0), "|")(1) w = CInt(Split(size, "x")(0)) + 50 h = CInt(Split(size, "x")(1)) + 50 imgStr = "Yes" Else: imgStr = NA End If If J mod 2 = 0 then cellColor = "class='evencell'": Else: cellColor = "class='oddcell'" %> <% If len(firstOpt) > 0 then Response.Write "" %> <% rs.MoveNext End If Next rs.close %>
Posted On: Subject: Posted By: Location: Picture:" & firstOpt & ":Views: Action:
align="center"><%= iDate %> ><%= subject %> align="center"><%= nick %> align="center"><%= city %> align="center"><%= imgStr %>" & firstOptValue & " align="center"><%= views %> align="center"> <% If adOwner Or moderator then If active = 2 then Response.Write "Repost" ElseIf active = 1 then Response.Write "Edit" End If If moderator then Response.Write " Delete" If active = 0 then Response.Write " Activate" End If End If Else: Response.Write "=" End If %>
<% Session("adlist_show_page" & strSUnique) = Empty End If Else: Response.Write "

" & msgInvalid & "

" End If set rscat = objConn.Execute("SELECT " & tablPfx & "Cat.catName, " & tablPfx & "Cat.catID FROM " & tablPfx & "Cat ORDER BY catName;") Do while not rscat.EOF nextCatName = rscat("catName") nextcatID = rscat("catID") If nextCatName = catName then optCat = optCat & "" Else: optCat = optCat & "" End If rscat.MoveNext Loop rscat.close set rscat = Nothing %>
Jump to Category: 
<% Else: Response.Write "

" & msgInvalid & "

" End If %>